import java.util.Arrays;

public class a4 {

	
		public static void main(String[] args) {
			int oldArr[]={1,3,4,5,0,0,6,6,0,5,4,7,6,7,0,5}; 
			int zero=0;
			for(int i: oldArr)
			{
				if(i==0) {

				zero++;
			}
	}
			int arr[]=new int[oldArr.length-zero];
			int h=0;
			for(int i:oldArr)
			{
				if(i!=0)
				{
					arr[h]=i;
					h++;			
				}
			}
			System.out.println(Arrays.toString(arr));


	}

}
